﻿<%@ Page Title="Page d'accueil" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="Twittit.Web._Default"%>

<%@ Register Assembly="FreshClickmedia.Web" Namespace="FreshClickMedia.Web.UI.WebControls"
    TagPrefix="fcm" %>


<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

<div id="leftpan">
<div class="profile">
					<div class="avatar">
                        <fcm:Gravatar ID="UserGravatar" runat="server" OutputGravatarSiteLink="false"/>
					</div>
					<div class="user"><span id="username">
						<asp:Literal ID="userliteral" runat="server" >
                        
                        </asp:Literal></span>
						<span class="less">
							<asp:Literal ID="UserDescriptionLiteral" runat="server" />
						</span>
					</div>
					<div class="linkto">
						<a href="/Profile.aspx" class="button">Voir le profil</a>
						</div>
				</div>
                <div id="choices"><a href="#" id="public">Publics</a><a href="#" id="private">@Mentions</a></div>			
				<div id="addpost">
                    <asp:TextBox TextMode="MultiLine" MaxLength="140" runat="server" ID="TwittTextarea" />
                    <asp:RequiredFieldValidator runat="server" ControlToValidate="TwittTextarea" ErrorMessage="Le twittit ne peut pas etre vide !" Display="Dynamic" ID="TwittitTextareaValidator"></asp:RequiredFieldValidator>

                    <asp:Button ID="TwittitButton" Text="Twittit !! " runat="server" onclick="TwittitButton_Click1" class="twittajax" />
					
					<div class="autocomplete">
					</div>
				</div>
		        <div id="counter">
                    <span id="charactersAvailable">140</span> caract&egrave;res restants
                </div>
				<div class="twitts">
					<asp:Repeater runat="server" ID="UserTwittsRepeater" >
                    <ItemTemplate>
                    <div class="twitt">
						<span class="avatar">
                            <fcm:Gravatar ID="repeaterGravatar" runat="server" Email=<%# Eval("User.email") %> Size="50" OutputGravatarSiteLink="false"/>
						</span>
	
						<div class="ctrl">
                            <a href="#" class="answer"><img src="../Images/answer.png" />Répondre</a>
							<a href="#" class="retwitt"><img src="../Images/forward.png" />Retwittiter</a>
                            <%# DataBinder.Eval(Container.DataItem,"User").ToString() == Session["username"].ToString() ? "<a class=\"delete\" twittid=\""+Eval("id")+"\" href=\"#\"><img src=\"../Images/delete.png\" />Supprimer</a>" : "" %>
						</div>
						
						<span class="author">
							<a href="Profile.aspx?user=<%# Eval("User.id") %>"><%# Eval("User") %></a>
						</span>

						<span class="content">
							<%# Eval("mixed") %>
						</span>			
						
						<span class="date">
							<%# DataBinder.Eval(Container.DataItem, "date", "{0:d}")     %>
						</span>

					</div>
                    </ItemTemplate>
                    </asp:Repeater>
                </div>
                <a href="#" id="older">Twittits plus anciens</a>
          
			    		
			</div>
			<div id="rightpan">
				<div id="yourtwitts">
					Vous avez poste <asp:Literal ID="UserPostCount" runat="server"></asp:Literal> Twittits
					<br />
					<br />
					<a href="#" class="button" id="subscription-button"><asp:Literal ID="PendingRequestsCount" runat="server"></asp:Literal> nouvelle(s) demande(s) d'abonnement</a>
					<div class="subscription-list">
						<ul>
                            <asp:Repeater runat="server" ID="SubscriptionRequestsRepeater" >
                                <ItemTemplate>
                                    <li> <%# Eval("twittit") %> <a class="acceptrequest" href="#" userid="<%# Eval("id") %>"><img src="../Images/agree.png" /></a> 
                                    <a href="#" userid="<%# Eval("id") %>" class="denyrequest"><img src="../Images/refuse.png" /></a></li>
                                </ItemTemplate>
                            </asp:Repeater>
							
						</ul>
					</div>
				</div>	
				<div id="following">
                    <div class="activity">
					    <div class="item"><span class="title">Abonnements</span><span class="value" >Vous suivez actuellement <asp:Literal ID="SubscribedCount" runat="server"></asp:Literal> Twittiters</span></div>
					    <div class="item"><span class="title">Abonnes </span><span class="value" ><asp:Literal ID="SubscribersCount" runat="server"></asp:Literal> Twittiters suivent vos publications</span></div>
                        <div class="item"><span class="title">@Mentions </span><span class="value" >Vous avez été Twittité <asp:Literal ID="MentionsCount" runat="server"></asp:Literal> fois </span></div>
                        <div class="item">
                            <span class="title">Twittiters suggérés </span>
					        <ul class="followed">
                            <asp:Repeater ID="UsersRepeater" runat="server">
						        <ItemTemplate>
                                    <li><a href="/Profile.aspx?user=<%# Eval("id") %>" class="suggested" title=<%# Eval("twittit") %>><span class="username"><%# Eval("twittit") %></span><fcm:Gravatar ID="SuggestedRepeaterGravatar" OutputGravatarSiteLink="false" Email=<%# Eval("email") %> Size="48" runat="server" />
                                    </a></li>
                                </ItemTemplate>
					        </asp:Repeater>
                            </ul>
                        </div>
                    </div>
				</div>			
			</div>
</asp:Content>
